home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Toolkit / Songbird 0.1 / Songbird_0_1_0.exe / chrome / content / koshi_test.xul < prev    next >
Extensible Markup Language  |  2006-02-07  |  6KB  |  160 lines

  1. ∩╗┐<?xml version="1.0"?>
  2. <!--
  3. /*
  4. //
  5. // BEGIN SONGBIRD GPL
  6. // 
  7. // This file is part of the Songbird web player.
  8. //
  9. // Copyright┬⌐ 2006 Pioneers of the Inevitable LLC
  10. // http://songbirdnest.com
  11. // 
  12. // This file may be licensed under the terms of of the
  13. // GNU General Public License Version 2 (the ΓÇ£GPLΓÇ¥).
  14. // 
  15. // Software distributed under the License is distributed 
  16. // on an ΓÇ£AS ISΓÇ¥ basis, WITHOUT WARRANTY OF ANY KIND, either 
  17. // express or implied. See the GPL for the specific language 
  18. // governing rights and limitations.
  19. //
  20. // You should have received a copy of the GPL along with this 
  21. // program. If not, go to http://www.gnu.org/licenses/gpl.html
  22. // or write to the Free Software Foundation, Inc., 
  23. // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  24. // 
  25. // END SONGBIRD GPL
  26. //
  27.  */
  28. -->
  29. <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
  30. <?xml-stylesheet href="chrome://rmp_demo/skin" type="text/css"?>
  31. <?xml-stylesheet href="chrome://rmp_demo/content/bindings/bindings.css" type="text/css"?>
  32. <!DOCTYPE window SYSTEM "chrome://rmp_demo/locale/rmp_demo.dtd" >
  33. <window
  34.  xmlns:html="http://www.w3.org/1999/xhtml"
  35.  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  36.  id="watchfolder"
  37.  title="&watchfolder.title;"
  38.  hidechrome="true"
  39.  onkeypress="if ( event.keyCode == 13 ) { if ( doOK() ) onExit(); } else if ( event.keyCode == 27 ) { if ( doCancel() ) onExit(); }"
  40.  onload="doLoad();"
  41. >
  42.   
  43. <windowregion/>
  44.  
  45. <stack flex="1">
  46.  
  47.   <vbox class="sb_faceplate" flex="1" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();">
  48.     <hbox class="sb_faceplate">
  49.         <image id="chrome_nw" class="sb_faceplate"/>
  50.         <image id="chrome_n" class="sb_faceplate" flex="1"/>
  51.         <image id="chrome_ne" class="sb_faceplate"/>
  52.     </hbox>
  53.     <hbox class="sb_faceplate" flex="1">
  54.         <image id="chrome_w" class="sb_faceplate"/>
  55.         <spacer onmousedown="onBkgDown( event );" onmouseup="onBkgUp();" flex="1"/>
  56.         <image id="chrome_e" class="sb_faceplate"/>
  57.     </hbox>
  58.     <hbox class="sb_faceplate">
  59.         <image id="chrome_sw" class="sb_faceplate"/>
  60.         <image id="chrome_s" class="sb_faceplate" flex="1"/>
  61.         <image id="chrome_se" class="sb_faceplate"/>
  62.     </hbox>
  63.   </vbox>
  64.  
  65.   <vbox class="sb_faceplate">
  66.     <hbox class="sb_faceplate">
  67.       <spacer height="8" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/> 
  68.     </hbox>
  69.     <hbox class="sb_faceplate" flex="1">
  70.       <spacer width="8" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();" />
  71.       <vbox class="sb_faceplate chrome_bkgd" flex="1">        
  72.       
  73.         <hbox id="window_top" class="sb_faceplate" >
  74.           <label id="app_title" value="&watchfolder.title;" class="sb_faceplate" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>
  75.           <spacer width="5" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>                    
  76.           <spacer flex="1" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>           
  77.           <spacer width="5" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>
  78.           <button id="sysbtn_close" class="sb_faceplate" oncommand="onExit( );" tooltiptext="&tooltip.exit;"/>
  79.         </hbox>
  80.         
  81.         <label class="dialog_label" value="&watchfolder.folderlist;" />
  82.         <spacer height="1" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>
  83.         <watch_folders id="watch_folders" browse="&window.browse;" flex="1"/>
  84.         <spacer height="6" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>
  85.         
  86.         <hbox>
  87.           <spacer flex="1" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>           
  88.           <button id="button_ok" label="&window.ok;" class="dialog_button sb_faceplate" oncommand="if ( doOK() ) onExit( );"/>
  89.           <spacer width="5" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>
  90.           <button id="button_cancel" label="&window.cancel;" class="dialog_button sb_faceplate" oncommand="if ( doCancel() ) onExit( );"/>
  91.         </hbox>
  92.         
  93.       </vbox>
  94.       <spacer width="8" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>
  95.     </hbox>
  96.     <hbox class="sb_faceplate" id="frame_bottom_resizers">
  97.       <x_resizer id="frame_resize_to" dir="bottomleft" x_style="cursor: sw-resize;"/>
  98.       <x_resizer id="frame_resize_t" dir="bottom" x_style="cursor: s-resize;" flex="1"/>
  99.       <x_resizer id="frame_resize_to" dir="bottomright" x_style="cursor: se-resize;"/>
  100.     </hbox>
  101.   </vbox>
  102. </stack>
  103.   
  104.   <script type="application/x-javascript" 
  105.    src="chrome://rmp_demo/content/rmp_demo.js" />
  106.   <script>
  107.   <![CDATA[
  108.     function doLoad() 
  109.     {
  110.       try
  111.       {
  112.         var array = new Array();
  113.         
  114.         array.push( "c:\\junq" );
  115.         array.push( "c:\\windows" );
  116.       
  117.         var watch_folders = document.getElementById("watch_folders");
  118.         
  119.         watch_folders.setFolders( array );
  120.         
  121.         watch_folders.animateNewFolder()
  122.       }
  123.       catch (err)
  124.       {
  125.         alert("watch_folders.xul - doLoad - " + err);
  126.       }
  127.     }
  128.     
  129.     function doOK()
  130.     {
  131.       var watch_folders = document.getElementById("watch_folders");
  132.       var array = watch_folders.getFolders();
  133.       
  134.       var text = array.length + " folder" + ( ( array.length == 1 ) ? "" : "s" ) + "\r\n";
  135.       for ( var i in array )
  136.       {
  137.         text += " ------ " + array[ i ] + "\r\n";
  138.       }
  139.       alert( text );
  140.       
  141.       if ( window.arguments && window.arguments[0] )
  142.       {
  143.         window.arguments[0].retval = "ok";
  144.       }
  145.       return true;
  146.     }
  147.     
  148.     function doCancel()
  149.     {
  150.       if ( window.arguments && window.arguments[0] )
  151.       {
  152.         window.arguments[0].retval = "cancel";
  153.       }
  154.       return true;
  155.     }
  156.   ]]>
  157.   </script>
  158.   
  159. </window>
  160.